/**
 * File Model.java 
 */
package cs.model;

import javax.swing.DefaultListModel;



/**
 * The model class contains references to all entities observed by the model views. 
 * These are constructed when building the model. <br>
 * This allows you to add models without fundamentally changing the main classes.
 * <p>
 * Package  cs.model
 * Project ChatSystemG1 - INSA 4INFOA1 - 2013/2014
 * @author Julie DUMONS & Juste OUEDRAOGO
 */
public class Model  {

	/**
	 * the userList model
	 */
	private DefaultListModel userListModel;
	
	/**
	 * the list of messages to send by the ni
	 */
	private MsgToSendModel msgToSendModel ; 
	
	/**
	 * the list of received messages by others users
	 */
	private ReceivedMsgModel receivedMsgModel ; 
	
	/**
	 * the state of localUser (connected, deconnected..)
	 */
	private State state ; 
	
	/**
	 * the list of FileToSend Objects
	 */
	private FileToSendModel  fileToSendModel ; 
	
	/**
	 * List of file received by NI
	 */
	private ReceivedFileModel receivedFileModel ; 
	
	


	/**
	 * constructor
	 */
	public Model() {	
		state = new State();
		userListModel = new DefaultListModel();
		msgToSendModel = new MsgToSendModel(); 
		receivedMsgModel = new ReceivedMsgModel() ; 
		fileToSendModel = new FileToSendModel(); 
		receivedFileModel = new ReceivedFileModel(); 
	}
	
	
	/**
	 * get the user list model
	 * @return userListModel
	 */
	public DefaultListModel getUserListModel() {
		return userListModel;
	}
	
	
	/**
	 * get msgToSendModel
	 * @return msgToSendModel
	 */
	public MsgToSendModel getMsgToSendModel() {
		return msgToSendModel;
	}


	/**
	 * get receivedMsgModel
	 * @return receivedMsgModel
	 */
	public ReceivedMsgModel getReceivedMsgModel() {
		return receivedMsgModel;
	}


	/**
	 * 
	 * @return State
	 */
	public State getState() {
		return state ;
	}

	/**
	 * @return fileToSendModel
	 */
	public FileToSendModel getFileToSendModel() {
		return fileToSendModel;
	}
	
	/**
	 * @return the receivedFileModel
	 */
	public ReceivedFileModel getReceivedFileModel() {
		return receivedFileModel;
	}
	
}
